package com.e3.web.widget.client;

import com.extjs.gxt.ui.client.util.IconHelper;
import com.extjs.gxt.ui.client.widget.menu.MenuItem;

public class MyMenuItem extends MenuItem {
	
	private BaseAction action;
	
	public MyMenuItem(BaseAction action) {
		super();
		this.action = action;
		setText(action.getText());
		setIcon(IconHelper.create(action.getIcon()));
		
		action.addComponent(this);
	}
	
	public BaseAction getAction() {
		return action;
	}

	public void setAction(BaseAction action) {
		this.action = action;
	}
}
